package com.example.demoddd.application.dto;

import com.example.demoddd.domain.userauth.model.User;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;


@Getter
@Setter
public class UserDto {
    private String username;
    private String email;
    private String password;


    @Getter
    @Setter
    @ToString
    @NoArgsConstructor //用做RequestBody 必须有无参构造器
    public static class CreateUserDto {
        private String username;
        private String email;
        private String password;
    }

    public static UserDto build(User user) {
        UserDto userDto = new UserDto();
        userDto.setUsername("ggg");
        return userDto;
    }
}
